GtkMenuTrackerItem: small logic tweak
authorRyan Lortie <desrt@desrt.ca>
Sat, 4 Jan 2014 07:04:53 +0000 (02:04 -0500)
committerRyan Lortie <desrt@desrt.ca>
Wed, 8 Jan 2014 19:21:18 +0000 (14:21 -0500)
Strictly speaking, can_activate should always be set back to FALSE when
the action disappears from the muxer (since we can't activate it
anymore) but we forgot to do that.

This 'bug' could never cause a problem because 'can_activate' is never
directly queried for anything at all and the item would get marked
insensitive anyway.  As soon as the action was re-added, can_activate
would be recalculated based on the new action before anything else could
happen.

All the same, this should be cleared here.

https://bugzilla.gnome.org/show_bug.cgi?id=688421

gtk/gtkmenutrackeritem.c

index d22004117484ac14786326b99d898eb7b66ed1cf..dc46be891db7a136e27ea5489caca3bd524c0353 100644 (file)
@@ -357,6 +357,8 @@ gtk_menu_tracker_item_action_removed (GtkActionObserver   *observer,
   if (!self->can_activate)
     return;
 
+  self->can_activate = FALSE;
+
   g_object_freeze_notify (G_OBJECT (self));
 
   if (self->sensitive)